<?php 
	/**
	* 创建一个风扇类
	*/
	class Fan{
		public $name;
		public $money;
		private $shanye;
		private $height;
		private $width;

		public function __construct($name="Tom", $money=100) {
			$this->name = $name;
			$this->money = $money;
		}

		public function xuanzhuan($shanye, $height, $width){
			$this->shanye = $shanye;
			$this->height = $height;
			$this->width  = $width;

			$this->mai($shanye, $height, $width);
		}

		private function mai($shanye, $height, $width) {

			echo "这个风扇的品牌是：{$this->name}，需要{$this->money}块，有{$this->shanye}个扇叶，高是{$this->height}，宽是{$this->width}";
		}
		function __destruct(){
			echo "风扇还可以吧！！";
		}
	}

	$a = new Fan("No.1", 200);
	echo $a->xuanzhuan(4, 200, 200);















 ?>